
/**Questa classe contiene il main() che crea l'istanza del Manager
 * @author Team5
 */
import Commons.Replicazione.RMManager;
import Manager.*;
import java.io.IOException;

import java.net.UnknownHostException;
import javax.xml.stream.XMLStreamException;

/**Questa classe contiene il main() che crea l'istanza del Manager
 *
 * @author team5
 */
public class MainManager {


       static private RMManager rmm;
       static private Manager m;
    public static void main(String[] args) throws UnknownHostException, XMLStreamException, InterruptedException, IOException, Exception {
       try{
       System.out.println("MainManager: start");
       System.out.println("MainManager: creo un istanza del Manager");
       rmm=new RMManager();
       m=new Manager(rmm);
       
       //rmm=m.getRepliactionManager();

        }catch(Exception ex)
       {
       System.out.println("CRASH MANAGER... LO RIAVVIO");
       //System.out.println(rmm.recuperaStato().getID());
       if(rmm==null){System.out.println("null1");}else{rmm.toString();}
        if(rmm.recuperaStato()==null){System.out.println("null2");}
       Manager m1=new Manager(rmm.recuperaStato(),rmm);
        }

    }

}
